﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WindowsFormsView;

namespace WindowsFormsPresenter.RestaurantTable
{
    public class RestaurantTablesPresenter : Presenter<IRestaurantTablesView>
    {
        public RestaurantTablesPresenter(IRestaurantTablesView view)
            : base(view)
        {
        }

        public void DisplayByPageAndBranch(int currentPage)
        {
            View.RestaurantTables = Model.GetRestaurantTablesByPageAndBranch(currentPage);
        }

        public void DisplayByPageAndBranchAndArea(int currentPage, string restaurantAreaId)
        {
            View.RestaurantTables = Model.GetRestaurantTablesByPageAndArea(currentPage, restaurantAreaId);
        }

        public int GetTotalPageByBranch()
        {
            return Model.GetTotalPageFromRestaurantTableByBranch();
        }

        public int GetTotalPageByBranchAndArea(string restaurantAreaId)
        {
            return Model.GetTotalPageFromRestaurantTableByBranchAndAera(restaurantAreaId);
        }
    }
}
